﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SDT.Model;
using SDT.Lib.Common;
using System.Web.Mvc;
using SDT.Systems;
using SDT.Lib.Paging;
namespace SDT.Admin.ViewModels
{
    public class ArticleCategoryIndexViewModel
    {
        public IPagedList<ArticleCategory> ArticleCategories
        {
            get;
            set;
        }

        public ArticleCategory CurrentArticleCategory
        {
            get;
            set;
        }

        public List<ArticleCategory> ChidrentArticleCategories
        {
            get;
            set;
        }

        public int? CurrentPubStatus;
        public string Keyword;
        public List<SelectListItem> ListStatusPub
        {
            get
            {
                List<SelectListItem> list = new CommonType().ToList();
                if (this.CurrentPubStatus.HasValue)
                    list.SingleOrDefault(i => int.Parse(i.Value) == this.CurrentPubStatus.Value).Selected = true;

                return list;
            }
        }
    }

    public class ArticleCategoryEditViewModel
    {
       
        public ArticleCategory ArticleCategory { get; set; }
        public List<ArticleCategory> ParrentArticleCatrgories { get; set; }
        public Dictionary<object, object> LanguageCode { get; set; }
    }
}
